package t2;

public class Cat {
    String name;
    int age;
    String gender;
    int weight;

    public Cat(){

    }

    public Cat(String name){
        this.name=name;
    }


    public void eat(String food){
        System.out.println("猫咪最爱吃的食物是"+food);
    }

    public void computer(int[] nums){

        int max=0;

        for (int i=0;i< nums.length;i++){
            if(nums[i]>max){
                max= nums[i];
            }
        }
        System.out.println("这个数组中的最大值为"+max);

    }

    public void  showInfo(Cat c){

        System.out.println(c.name+"这个猫年龄为"+c.age);
    }


    public Cat  showInfo(String name,int age,String gender,int weight){

        Cat c=new Cat();
        c.name=name;
        c.age=age;
        c.gender=gender;
        c.weight=weight;
        System.out.println("aaaa");
        System.out.println("bbb");

        return c;

    }


}
